{extend name="base"/}

{block name="resources"}
<style type="text/css">
.refresh-wrap{
	width: 100%;
	height: 100px;
	padding-top: 150px;
	text-align: center;
}
.refresh-wrap .desc {
	font-size: 12px;
	color: #999;
	margin-top: 10px;
}
.layui-btn .layui-icon{
	margin-right: 5px;
	font-size: 14px;
	display: none;
}
.refresh-wrap .loading{
	opacity: .8;
	cursor: no-drop;
}
.refresh-wrap .loading .layui-icon {
	display: inline-block;
}
</style>
{/block}

{block name="main"}
<div class="layui-collapse ns-tips">
	<div class="layui-colla-item">
		<h2 class="layui-colla-title">操作提示</h2>
		<ul class="layui-colla-content layui-show">
			<li>只有saas开源版可下载，下载后可通过HBuilder X编译为H5、微信小程序、支付宝小程序、头条小程序等</li>
		</ul>
	</div>
</div>

<div class="refresh-wrap">
	{if $isauth}
	<a class="layui-btn ns-bg-color" href="{:url('admin/system/downloaduniapp')}" target="_blank"><i class="layui-icon layui-icon-loading layui-anim layui-anim-rotate layui-anim-loop"></i>下载UNIAPP源码包</a>
	{else/}
	<a class="layui-btn ns-bg-color" onclick="authLayer()"><i class="layui-icon layui-icon-loading layui-anim layui-anim-rotate layui-anim-loop"></i>下载UNIAPP源码包</a>
	{/if}
</div>
{/block}

{block name="script"}
<script type="text/javascript">
    function authLayer(){
        layer.confirm('当前为免费版，授权后才可以下载UNIAPP源码包！是否立即授权？', {
            btn: ['立即授权','暂不需要'] //按钮
        }, function(){
            window.open('https://www.niushop.com');
        }, function(){
            layer.closeAll();
        });
    }
</script>
{/block}